
mui.init();
var offCanvasWrapper;
mui.ready(function(){
	//侧滑容器父节点
	offCanvasWrapper = mui('#offCanvasWrapper');	
	//主界面容器
	var offCanvasInner = offCanvasWrapper[0].querySelector('.mui-inner-wrap');
	//菜单容器
	var offCanvasSide = document.getElementById("offCanvasSide");
	/*if (!mui.os.android) {
		document.getElementById("move-togger").classList.remove('mui-hidden');
		var spans = document.querySelectorAll('.android-only');
		for (var i = 0, len = spans.length; i < len; i++) {
			spans[i].style.display = "none";
		}
	}*/
	
	//显示品牌
	document.getElementById('select_brand').addEventListener('tap', function() {
		Condition.showBrands();
		offCanvasWrapper.offCanvas('show');
	});
	
	//显示类型
	document.getElementById('select_type').addEventListener('tap', function() {
		Condition.showTypes();
		offCanvasWrapper.offCanvas('show');
	});
	
	//显示价格
	document.getElementById('select_price').addEventListener('tap', function() {
		Condition.showPrices();
		offCanvasWrapper.offCanvas('show');
	});
	//展开或收起精选乐器的菜单
	document.getElementById('offCondition').addEventListener('tap', function() {
		jQuery(".conditionbox").toggleClass("hide");
		jQuery(".data-box-wrapper").toggleClass("more");
	});
	
	/*document.getElementById('offCanvasHide').addEventListener('tap', function() {
		offCanvasWrapper.offCanvas('close');
	});*/
	 //主界面和侧滑菜单界面均支持区域滚动；
	mui('#offCanvasSideScroll').scroll();
	mui('#offCanvasContentScroll').scroll();
	 //实现ios平台原生侧滑关闭页面；
	if (mui.os.plus && mui.os.ios) {
		mui.plusReady(function() { 
			plus.webview.currentWebview().setStyle({
				'popGesture': 'none'
			});
		});
	}
	
    Condition.init();    
    
    Instruments.init();
    
    mui('.data-box-wrapper').scroll({
		deceleration: 0.0005
	});
})




